//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package ui;

import java.awt.Dimension;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;

public class MyOutMessagePane extends JPanel {
    private int width;
    private int height;
    private String label;
    private JTextPane myTextPane;
    private JLabel myLabel;
    private JScrollPane scrollPane;

    public MyOutMessagePane(String label, JTextPane myTextPane, int width, int height) {
        this.label = label;
        this.myTextPane = myTextPane;
        this.width = width;
        this.height = height;
        this.setPreferredSize(new Dimension(width, height));
        this.init();
    }

    private void init() {
        int inboxWidth = (int)((double)this.width * 0.95D);
        int inboxHeight = (int)((double)this.height * 0.8D);
        Dimension inboxSize = new Dimension(inboxWidth, inboxHeight);
        this.myLabel = new JLabel(this.label, 2);
        this.myLabel.setPreferredSize(new Dimension(inboxWidth, 24));
        this.myTextPane.setPreferredSize(inboxSize);
        this.scrollPane = new JScrollPane(this.myTextPane, 22, 31);
        this.scrollPane.setPreferredSize(inboxSize);
        this.add(this.myLabel);
        this.add(this.scrollPane);
    }

    public int getWidth() {
        return this.width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return this.height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public String getLabel() {
        return this.label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public JTextPane getMyTextPane() {
        return this.myTextPane;
    }

    public void setMyTextPane(JTextPane myTextPane) {
        this.myTextPane = myTextPane;
    }
}
